PBDTGetInfoSync
PBDTGetInfo Obtain desktop database information.
#include <Files.h> Finder Interface
OSErr PBDTGetInfo(paramBlock, async);
DTPBPtr paramBlock ; pointer to a DTPB Param Block
Boolean async; 0 = await completion; 1 = immediate return
To determine the parent directory and the amount of space used by the desktop
database on a particular volume, use the PBDTGetInfo function.
Parameter block
ۮ 12 ioCompletion long completion routine
۬ 16 ioResult short result code
€´ 24 ioDTRefNum short desktop database reference number
ۮ 26 ioIndex short number of files in desktop database
۬ 48 ioDirID long parent directory of desktop database
۬ 64 ioDTLgLen long logical length of database files
۬ 68 ioDTPyLen long physical length of database files
Specify the volume of the desktop database in ioDTRefNum. The parent
directory of the desktop database for the volume is returned in ioDirID. The
sum of the logical lengths of the files that constitute the desktop database for a
given volume is returned in ioDTLgLen; the sum of the physical lengths of the
files that constitute the desktop database for a given volume is returned in
ioDTPyLen. The number of files maintained by the Desktop Manager is
returned in ioIndex. The volume containing the file is returned in ioDTRefNum.
Returns: an Error code. It will be one of the following:
noErr (0) No err
ioErr (-36) I/O error
rfNumErr (-51) Reference number invalid
extFSErr (-58) External file system-file system identifier is nonzero

Note: There is a second, asynchronous, version of this function. It does not take a
second parameter; instead, it adds the suffix "Async" to the name of the
routine.
Similarly, the third (synchronous) version of the routine does not take a
second parameter; instead, it adds the suffix "Sync" to the name of the
routine.
Note, however, that the second and third versions of these routines do not
use the glue code that the first versions use and are therefore more
efficient.